﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SqlMiM.SqlServer.Model;
using SqlMiM.Common.ViewModel;
using MvvmFoundation.Wpf;

namespace SqlMiM.SqlServer.ViewModel
{
    public class FilesStatView : ObservableObject
    {
        private List<Size> allIOMO;
        private List<Size> allIO;

        private FilesStat filesStat;

        public FilesStat FilesStat
        {
            get
            {
                return filesStat;
            }
            set
            {
                filesStat = value;
                this.RaisePropertyChanged("FilesStat");
            }
        }


        public List<Size> ALLIOMO
        {
            get
            {
                if (allIOMO == null)
                    allIOMO = new List<Size>();

                allIOMO.Add(new Size() { Name = "Reads Mo", Value = this.FilesStat.ReadsMo });
                allIOMO.Add(new Size() { Name = "Writes Mo", Value = this.FilesStat.WritesMo });

                return allIOMO;
            }
        }

        public List<Size> ALLIO
        {
            get
            {
                if (allIO == null)
                    allIO = new List<Size>();

                allIO.Add(new Size() { Name = "Reads", Value = this.FilesStat.Reads });
                allIO.Add(new Size() { Name = "Writes", Value = this.FilesStat.Writes });

                return allIO;
            }
        }



        public FilesStatView()
        {
        }

    }

}
